import request from "@/utils/request";
import qs from "qs";

export function getData(params) {
  return request({
    url: "/msbd/list",
    methods: "get",
    params,
    baseURL: "http://localhost:2345"
  });
}
//新增
export function setData(data) {
  return request({
    url: "/msbd/addList",
    method: "post",
    data: qs.stringify(data),
    baseURL: "http://localhost:2345"
  });
}

//修改
export function updata(data) {
  return request({
    url: "/msbd/updateList",
    method: "post",
    data: qs.stringify(data),
    baseURL: "http://localhost:2345"
  });
}

//删除
export function removeDate(id) {
  return request({
    url: "/msbd/delList",
    method: "get",
    params: {
      id
    },
    baseURL: "http://localhost:2345"
  });
}

export function getClassiyfData() {
  return request({
    url: "/classify/list",
    method: "get",
    baseURL: "http://localhost:2345"
  });
}
